import { axios } from '@/service/service'
export function findUserNotArchiveProjectsReq(params: any): any {
  return axios({
    url: '/api-project/project/findUserNotArchiveProjects',
    method: 'get',
    params
  })
}

export function switchProjectReq(params: any): any {
  return axios({
    url: '/api-uaa/project/switch',
    method: 'get',
    params
  })
}

export function delProMenberReq(params: any): any {
  return axios({
    url: '/api-project/project/delProMenber',
    method: 'get',
    params
  })
}

export function addProMenberReq(params: any): any {
  return axios({
    url: '/api-project/project/addProMenber',
    method: 'get',
    params
  })
}

export function updateUserProRoleReq(params: any, data: any): any {
  return axios({
    url: '/api-project/project/updateProMenberRole',
    method: 'post',
    params,
    data
  })
}

export function getProjectListReq(params: any): any {
  return axios({
    url: '/api-project/project/findProjects',
    method: 'get',
    params
  })
}

export function projectArchivedReq(params: any): any {
  return axios({
    url: '/api-project/project/archived',
    method: 'get',
    params
  })
}

export function createProjectReq(data: any): any {
  return axios({
    url: '/api-project/project/create',
    method: 'post',
    data
  })
}

export function modProjectAliasReq(params: any): any {
  return axios({
    url: '/api-project/project/updateAlias',
    method: 'get',
    params
  })
}
export function modProjectDescReq(params: any): any {
  return axios({
    url: '/api-project/project/updateDesc',
    method: 'get',
    params
  })
}
export function updateProjectDepartmentReq(params: any): any {
  return axios({
    url: '/api-project/project/updateDepartment',
    method: 'get',
    params
  })
}

export function updateProAdminsReq(proId: number, data: any): any {
  return axios({
    url: `/api-project/project/updateProAdmins/${proId}`,
    method: 'post',
    data
  })
}

export function searchProByNameReq(params: any): any {
  return axios({
    url: '/api-project/project/search',
    method: 'get',
    params
  })
}
